<!--  -->
<template>
  <div>
    <span>子组件inject数据：{{ count }}</span>
    <span>子组件inject默认数据：{{ defaultMessage }}</span>
    <div>子组件symbolKey：{{ symbolKey }}</div>
  </div>
</template>

<script>
import { myInjectionKey } from '../../utils/keys'
export default {
  data() {
    return {}
  },
  //数组形式
  // inject: ['message'],

  //对象形式
  inject: {
    count: {
      from: 'message',
    },
    defaultMessage: {
      form: 'defaultMessage',
      default: '默认注入',
    },
    symbolKey: {
      from: myInjectionKey,
    },
  },
}
</script>

<style lang="stylus" scoped></style>
